import { generateRandomId } from '@/utils';

export const editConfig: PageConfig = {
    items: [
        {
            itemType: 'text',
            modelKey: 'auxiliaryResourceCoding',
            elInputProps: {
                placeholder: '请输入辅助资源编码',
                disabled: true
            },
            columnProps: {
                label: '辅助资源编码'
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            itemType: 'text',
            modelKey: 'auxiliaryResourceName',
            elInputProps: {
                placeholder: '请输入辅助资源名称',
                maxlength: '50',
                showWordLimit: true
            },
            columnProps: {
                label: '辅助资源名称'
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            itemType: 'select',
            modelKey: 'type',
            columnProps: {
                label: '类型'
            },
            elSelectProps: {
                placeholder: '请选择类型',
                options: [
                    { value: 'TOOL', label: '夹具' },
                    { value: 'MOULD', label: '模具' },
                    { value: 'WORK_CLOTH', label: '工装' }
                ]
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            itemType: 'select',
            modelKey: 'status',
            elSelectProps: {
                placeholder: '请选择状态',
                options: [
                    { value: 'USING', label: '使用中' },
                    { value: 'IDLE', label: '空闲' },
                    { value: 'REPAIRING', label: '维修中' },
                    { value: 'SCRAP', label: '报废' }
                ]
            },
            columnProps: {
                label: '状态'
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            itemType: 'text',
            modelKey: 'description',
            columnProps: {
                label: '描述'
            },

            elInputProps: {
                type: 'textarea',
                placeholder: '请输入描述',
                maxlength: '50',
                autosize: true,
                showWordLimit: true
            },
            validProps: {
                id: generateRandomId()
            }
        }
    ]
};
